//代码演练场
import { TreeNode, outTree, treeToDom, buildTree } from './utils/treeUtil.js';
import { ListNode, arrToList, listToArr } from './utils/listUtil.js';
import { read_line, print, kamaACM } from './utils/ACM.js';
import { getRandom, sleep } from './utils/util.js';
console.clear()
console.log('\n\n————————————————————————————————————————————————————————————————\n\n');
// const treeData = buildTree([8, 3, 10, 1, 6, null, 14, null, null, 4, 7, 13])
/** 代码运行结果 */
const _res = (function reverseList(head: ListNode | null) {


})(arrToList([1, 2, 3, 4, 5]));


_res != undefined && console.log("\n最终结果为 ", (_res as any), "\n");
(_res as any)?.constructor === TreeNode && console.log('二叉树数组为', treeToDom(outTree((_res as any)), 'tree2')); //返回结果是二叉树时才打印
(_res as any)?.constructor === ListNode && console.log('链表数组为', listToArr(_res as any)); //返回结果是链表时才打印
/**用于让根目录的 index.ts 与本文件链接 */
export default _res
